package com.flexfiltering.view.skins
{
	import flash.display.Graphics;
	
	import mx.skins.Border;

	public class EditorHeaderBackground extends Border
	{
		public function EditorHeaderBackground()
		{
			super();
		}
		
		override protected function updateDisplayList(w:Number, h:Number):void
		{
			super.updateDisplayList(w,h);
			
			var g:Graphics = this.graphics;
			
			g.clear();
			
			var bt:Number = getStyle("borderThickness");
			var bkg_color:uint = getStyle("headerBackgroundColor");
			var cr:Number = getStyle("cornerRadius");
				cr -= bt;
				
			// background
			drawRoundRect(0,0,w,h,cr,bkg_color,0.3);
			
			// highlight
			drawRoundRect(0,0,w,h/2,{tr:cr,tl:cr,br:0,bl:0},0xFFFFFF,getStyle("headerHighlightAlpha"));
			
			// bottom bevel
//			drawRoundRect(0,h-1,w,1,0,0x000000,0.3);
		}
		
	}
}